Integrand size = 21, antiderivative size = 151 \[ \int (A+B \cos (c+d x)) \sec ^{\frac {7}{2}}(c+d x) \, dx=-\frac {6 A \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{5 d}+\frac {2 B \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {\sec (c+d x)}}{3 d}+\frac {6 A \sqrt {\sec (c+d x)} \sin (c+d x)}{5 d}+\frac {2 B \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{3 d}+\frac {2 A \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{5 d} \]
[Out]
Time = 0.14 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3317, 3872, 3853, 3856, 2720, 2719} \[ \int (A+B \cos (c+d x)) \sec ^{\frac {7}{2}}(c+d x) \, dx=\frac {2 A \sin (c+d x) \sec ^{\frac {5}{2}}(c+d x)}{5 d}+\frac {6 A \sin (c+d x) \sqrt {\sec (c+d x)}}{5 d}-\frac {6 A \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 d}+\frac {2 B \sin (c+d x) \sec ^{\frac {3}{2}}(c+d x)}{3 d}+\frac {2 B \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{3 d} \]
[In]
[Out]
Rule 2719
Rule 2720
Rule 3317
Rule 3853
Rule 3856
Rule 3872
Rubi steps \begin{align*} \text {integral}& = \int \sec ^{\frac {5}{2}}(c+d x) (B+A \sec (c+d x)) \, dx \\ & = A \int \sec ^{\frac {7}{2}}(c+d x) \, dx+B \int \sec ^{\frac {5}{2}}(c+d x) \, dx \\ & = \frac {2 B \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{3 d}+\frac {2 A \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{5 d}+\frac {1}{5} (3 A) \int \sec ^{\frac {3}{2}}(c+d x) \, dx+\frac {1}{3} B \int \sqrt {\sec (c+d x)} \, dx \\ & = \frac {6 A \sqrt {\sec (c+d x)} \sin (c+d x)}{5 d}+\frac {2 B \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{3 d}+\frac {2 A \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{5 d}-\frac {1}{5} (3 A) \int \frac {1}{\sqrt {\sec (c+d x)}} \, dx+\frac {1}{3} \left (B \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx \\ & = \frac {2 B \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {\sec (c+d x)}}{3 d}+\frac {6 A \sqrt {\sec (c+d x)} \sin (c+d x)}{5 d}+\frac {2 B \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{3 d}+\frac {2 A \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{5 d}-\frac {1}{5} \left (3 A \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \sqrt {\cos (c+d x)} \, dx \\ & = -\frac {6 A \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{5 d}+\frac {2 B \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {\sec (c+d x)}}{3 d}+\frac {6 A \sqrt {\sec (c+d x)} \sin (c+d x)}{5 d}+\frac {2 B \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{3 d}+\frac {2 A \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{5 d} \\ \end{align*}
Time = 0.40 (sec) , antiderivative size = 97, normalized size of antiderivative = 0.64 \[ \int (A+B \cos (c+d x)) \sec ^{\frac {7}{2}}(c+d x) \, dx=\frac {\sec ^{\frac {5}{2}}(c+d x) \left (-36 A \cos ^{\frac {5}{2}}(c+d x) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )+20 B \cos ^{\frac {5}{2}}(c+d x) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )+21 A \sin (c+d x)+10 B \sin (2 (c+d x))+9 A \sin (3 (c+d x))\right )}{30 d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(501\) vs. \(2(179)=358\).
Time = 22.51 (sec) , antiderivative size = 502, normalized size of antiderivative = 3.32
method | result | size |
default | \(-\frac {\sqrt {-\left (-2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (2 B \left (-\frac {\cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}}{6 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {1}{2}\right )^{2}}+\frac {\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1}\, F\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )}{3 \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}}\right )+\frac {2 A \left (24 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\sin ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-12 \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, E\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-24 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+12 \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, E\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+8 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-3 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, E\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right ) \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}}{5 \left (8 \left (\sin ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-12 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+6 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\right )}{\sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, d}\) | \(502\) |
parts | \(-\frac {2 A \sqrt {-\left (-2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (24 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\sin ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-12 \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, E\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-24 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+12 \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, E\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+8 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-3 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, E\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right ) \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}}{5 \left (8 \left (\sin ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-12 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+6 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} \sqrt {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, d}-\frac {2 B \left (-2 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, F\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, F\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right ) \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}}{3 \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right )}^{\frac {3}{2}} \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) d}\) | \(573\) |
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.10 (sec) , antiderivative size = 188, normalized size of antiderivative = 1.25 \[ \int (A+B \cos (c+d x)) \sec ^{\frac {7}{2}}(c+d x) \, dx=\frac {-5 i \, \sqrt {2} B \cos \left (d x + c\right )^{2} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + 5 i \, \sqrt {2} B \cos \left (d x + c\right )^{2} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) - 9 i \, \sqrt {2} A \cos \left (d x + c\right )^{2} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) + 9 i \, \sqrt {2} A \cos \left (d x + c\right )^{2} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) + \frac {2 \, {\left (9 \, A \cos \left (d x + c\right )^{2} + 5 \, B \cos \left (d x + c\right ) + 3 \, A\right )} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}}{15 \, d \cos \left (d x + c\right )^{2}} \]
[In]
[Out]
Timed out. \[ \int (A+B \cos (c+d x)) \sec ^{\frac {7}{2}}(c+d x) \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int (A+B \cos (c+d x)) \sec ^{\frac {7}{2}}(c+d x) \, dx=\int { {\left (B \cos \left (d x + c\right ) + A\right )} \sec \left (d x + c\right )^{\frac {7}{2}} \,d x } \]
[In]
[Out]
\[ \int (A+B \cos (c+d x)) \sec ^{\frac {7}{2}}(c+d x) \, dx=\int { {\left (B \cos \left (d x + c\right ) + A\right )} \sec \left (d x + c\right )^{\frac {7}{2}} \,d x } \]
[In]
[Out]
Timed out. \[ \int (A+B \cos (c+d x)) \sec ^{\frac {7}{2}}(c+d x) \, dx=\int \left (A+B\,\cos \left (c+d\,x\right )\right )\,{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^{7/2} \,d x \]
[In]
[Out]